Olympics
Intro
We need to write an introduction…..
USA Medal Exploration
The above medal time graph demonstrates the number of medals that the United States won each year that the Olympics were held. This allows us to see how the United States has performed at the Olympic stage. The graph has very sharp curves up and down which represent the medal differences between the summer and winter olympics. The USA tends to win more medals in the summer Olympics than the Winter olympics.
2016 Olympic Data Analysis
Olivia will explain this graph
GDP Country Maps
Nick needs to write a caption for this
Athlete Medal Analysis
## cluster min Q1 median Q3 max mean sd n missing
## 1 1 136 163 167 170 179 166.0061 6.077095 9903 0
## 2 2 164 187 190 195 223 191.3349 6.662754 6679 0
## 3 3 162 176 180 183 203 179.3911 4.734164 13599 0
## cluster min Q1 median Q3 max mean sd n missing
## 1 1 28 55 59 64 90 58.79935 6.840851 9903 0
## 2 2 70 87 92 98 182 94.04844 11.061994 6679 0
## 3 3 54 70 75 79 104 74.67582 6.286214 13599 0
Fritz explain your findings…
Conclusion
write a conclusion
References
Xie Y, Cheng J, Tan X (2022). “DT: A Wrapper of the JavaScript Library ‘DataTables’,” R package version 0.24, available at https://CRAN.R-project.org/package=DT.
Xie Y, Cheng J, Tan X (2023). DT: A Wrapper of the JavaScript Library ‘DataTables’. R package version 0.27, https://CRAN.R-project.org/package=DT.
Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R, Grolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E, Bache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi K, Vaughan D, Wilke C, Woo K, Yutani H (2019). “Welcome to the tidyverse.” Journal of Open Source Software, 4(43), 1686. doi:10.21105/joss.01686 https://doi.org/10.21105/joss.01686.
Links
You can include links using Markdown syntax as shown.
You should include links to relevant sites as you write. You should additionally include a list of references as the end of your blog with full citations (and relevant links).
Visualizations
Visualizations, particularly interactive ones, will be well-received. That said, do not overuse visualizations. You may be better off with one complicated but well-crafted visualization as opposed to many quick-and-dirty plots. Any plots should be well-thought-out, properly labeled, informative, and visually appealing.
If you want to include dynamic visualizations or tables, you should explore your options from packages that are built from htmlwidgets. These htmlwidgets-based packages offer ways to build lighterweight, dynamic visualizations or tables that don’t require an R server to run! A more complete list of packages is available on the linked website, but a short list includes:
Tables
DT package
The DT package is great for making dynamic tables that can be displayed, searched, and filtered by the user without needing an R server or Shiny app!
Note: you should load any packages you use in the setup
code chunk as usual. The library() functions are shown
below just for demonstration.
library(DT)
mtcars %>%
select(mpg, cyl, hp) %>%
datatable(colnames = c("MPG", "Number of cylinders", "Horsepower"),
filter = 'top',
options = list(pageLength = 10, autoWidth = TRUE))kableExtra package
You can also use kableExtra for customizing HTML tables.
library(kableExtra)
summary(cars) %>%
kbl(col.names = c("Speed", "Distance"),
row.names = FALSE) %>%
kable_styling(bootstrap_options = "striped",
full_width = FALSE) %>%
row_spec(0, bold = TRUE) %>%
column_spec(1:2, width = "1.5in") | Speed | Distance |
|---|---|
| Min. : 4.0 | Min. : 2.00 |
| 1st Qu.:12.0 | 1st Qu.: 26.00 |
| Median :15.0 | Median : 36.00 |
| Mean :15.4 | Mean : 42.98 |
| 3rd Qu.:19.0 | 3rd Qu.: 56.00 |
| Max. :25.0 | Max. :120.00 |
Images
Images and gifs can be displayed using code chunks:
Olympic Rings
Equations
You might include equations if part of the purpose of your blog is to explain a statistical method. There are two ways to include equations:
- Inline: \(b \sim N(0, \sigma^2_b)\)
- Display-style (displayed on its own line): \[\frac{\sigma^2_b}{\sigma^2_b + \sigma^2_e}\]
For typesetting equations appropriately, check out the AMS-LaTeX quick reference or take a look at the Symbols in math mode section of this cheat sheet (or do some extra Googling—there are many resources).
Formatting
Tabbed subsections
Each subsection below the “Tabbed subsections” section heading will appear in a tab. See R Markdown Cookbook Section 7.6: Put content in tabs for additional customization options.
Bulleted list
You can make a bulleted list like this:
- item 1
- item 2
- item 3
Numbered list
You can make a numbered list like this
- First thing I want to say
- Second thing I want to say
- Third thing I want to say
Column formatting
Content Column 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vel ipsum eu sem facilisis porttitor. Integer eu tristique lectus. Vestibulum nisi risus, porta sit amet cursus nec, auctor ac tellus. Integer egestas viverra rhoncus. Fusce id sem non ante vestibulum posuere ac sed lorem. Proin id felis a mi pellentesque viverra in at nulla. Duis augue nulla, aliquet ac ligula a, sagittis varius lorem.
Content Column 2
Aliquam non ante et erat luctus hendrerit eu ac justo. Fusce lacinia pulvinar neque non laoreet. Fusce vitae mauris pharetra, scelerisque purus eget, pharetra nisl. Aenean volutpat elementum tortor vitae rhoncus. Phasellus nec tellus euismod neque congue imperdiet tincidunt in mauris. Morbi eu lorem molestie, hendrerit lorem nec, semper massa. Sed vulputate hendrerit ex, eget cursus purus. Pellentesque consequat erat leo, eleifend porttitor lacus porta at. Vivamus faucibus quam ipsum, id condimentum ligula malesuada ultrices. Nullam luctus leo elit, vitae rutrum nibh venenatis eget. Nam at sodales purus. Proin nulla tellus, lacinia eget pretium sed, vehicula aliquet neque. Morbi vel eros elementum, suscipit elit eu, consequat libero. Nulla nec aliquet neque. Nunc bibendum sapien lectus, sed elementum nisi rutrum non. Ut vulputate at lacus eget maximus.
Customizing your blog design
As a final detail only if you have time,
you can explore options for customizing the style of your blog. By
default, we are using the readthedown theme from the rmdformats
package (see Line 6 of this file if you want to switch out
themes).
Theme
You can use the rmdformats package to play around with some pre-built themes. There are, I’m sure, many many many more similar packages with built in themes, or you can look into how to include a CSS code chunk to customize aspects of a theme.
Using the rmdformats package, you can change the theme itself (Line 6):
rmdformats::readthedownrmdformats::downcute- For
downcuteonly, you can add a new indented line below Line 6 with the codedowncute_theme: "chaos"for thedowncute chaostheme
- For
rmdformats::robobookrmdformats::material
You can explore additional YAML options by looking at the rmdformats
package page or running, for example,
?rmdformats::readthedown() to see the help documentation
for a particular theme from the package.
Synax highlighting
You can also change the code chunk syntax highlighting option (Line
7, highlight):
"default""tango""pygments""kate""monochrome""espresso""zenburn""haddock""textmate"NULLfor no syntax highlighting (not recommended)
Font size, type, and other customization
Further customization requires adding a CSS style file or code chunk or incorporating other development options. Customization beyond the rmdformats package should be your lowest and final priority for the project. Ensure your content is fully prepared first.
References
All data sources, any key R packages, and any other sources used in developing your blog should be cited in full in a list of references at the end of your blog. Your blog post should also link to these sources as they are discussed. You may choose any reference style as long as sources are fully cited (try to be consistent!).
Typically, references in R Markdown (and LaTeX) files are incorporated with a BibTeX database (a .bib file). You can try this approach or manually include either a numbered or alphabetized list.
Columbia University has compiled some guidance on how to cite data. Some data sources will give you the citation information to copy and paste. Use the provided citations or citation styles in those cases.
You can list R package citations with the code
citation("packageName") in the console and then copy (and
reformat as needed) the relevant text, e.g.,
##
## To cite package 'DT' in publications use:
##
## Xie Y, Cheng J, Tan X (2023). _DT: A Wrapper of the JavaScript
## Library 'DataTables'_. R package version 0.27,
## <https://CRAN.R-project.org/package=DT>.
##
## A BibTeX entry for LaTeX users is
##
## @Manual{,
## title = {DT: A Wrapper of the JavaScript Library 'DataTables'},
## author = {Yihui Xie and Joe Cheng and Xianying Tan},
## year = {2023},
## note = {R package version 0.27},
## url = {https://CRAN.R-project.org/package=DT},
## }
##
## To cite package 'tidyverse' in publications use:
##
## Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R,
## Grolemund G, Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller
## E, Bache SM, Müller K, Ooms J, Robinson D, Seidel DP, Spinu V,
## Takahashi K, Vaughan D, Wilke C, Woo K, Yutani H (2019). "Welcome to
## the tidyverse." _Journal of Open Source Software_, *4*(43), 1686.
## doi:10.21105/joss.01686 <https://doi.org/10.21105/joss.01686>.
##
## A BibTeX entry for LaTeX users is
##
## @Article{,
## title = {Welcome to the {tidyverse}},
## author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy D'Agostino McGowan and Romain François and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Lin Pedersen and Evan Miller and Stephan Milton Bache and Kirill Müller and Jeroen Ooms and David Robinson and Dana Paige Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
## year = {2019},
## journal = {Journal of Open Source Software},
## volume = {4},
## number = {43},
## pages = {1686},
## doi = {10.21105/joss.01686},
## }
The following citations are based on the American Statistical Association citation style (not all of these references are used in this document).:
Baumer, B. S., Kaplan, D. T., and Horton, N. J. (2021), Modern Data Science with R (2nd ed.), Boca Raton, FL: CRC Press.
Broman, K. W. and Woo, K. H. (2018), “Data Organization in Spreadsheets,” The American Statistician, 72:1, 2-10, doi: 10.1080/00031305.2017.1375989
Columbia University Libraries (n.d.), “Data Citation,” available at https://guides.library.columbia.edu/datacitation.
McNamara, A. and Horton N. J. (2018) “Wrangling Categorical Data in R,” The American Statistician, 72:1, 97-104, doi: 10.1080/00031305.2017.1356375.
Shah, Syed A. A. (October 2022), “Starbucks Drinks” (Version 1), Kaggle, available at https://www.kaggle.com/datasets/syedasimalishah/starbucks-drinks.
Xie Y, Cheng J, Tan X (2022). “DT: A Wrapper of the JavaScript Library ‘DataTables’,” R package version 0.24, available at https://CRAN.R-project.org/package=DT.